package com.itheima.jdk8date;

import java.time.Duration;
import java.time.LocalTime;

public class Demo06 {

    public static void main(String[] args) {
        LocalTime now = LocalTime.now();
        LocalTime morning = LocalTime.of(8, 0, 0);
        Duration between = Duration.between(morning, now);
        System.out.println(between);
        long miao = between.toSeconds();
        long haomiao = between.toMillis();
        long namiao = between.toNanos();
        System.out.println(miao);
        System.out.println(haomiao);
        System.out.println(namiao);

    }
}
